'use strict';

/**
 * @ngdoc function
 * @name jgappApp.controller:AttendanceAttendanceListCtrl
 * @description
 * # AttendanceAttendanceListCtrl
 * Controller of the jgappApp
 */
angular.module('jgappApp')
    .controller('AttendanceAttendanceListCtrl', function ($location, DataService, openApi) {
        var vm = this;
        this.goAttendanceDetail = function (pkId) {
            $location.path("attendance/attendance_detail/" + pkId)
        }
        this.addAttendance = function () {
            $location.path("attendance/attendance_detail")
        }
        var init = function () {
            DataService.getData(openApi.attList).then(function (data) {
                vm.list = data;
            })
        }
        init()
    });
